<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="" %>
<%@page import="org.apache.commons.lang.ObjectUtils"%>
<%@ include file="public/public.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<%
    String cssPath = request.getContextPath()+"/skin/skin1";
	String imagePath = request.getContextPath()+"/skin/skin1/images";
  	String msg = "";
    try{
    msg = valueStack.findString("msg");
    }catch(Exception e){
        //System.out.println("valueStack---------------- "+valueStack);
    };
 %>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="<%=cssPath%>/cms_css.css">
<title>四航局科技信息管理系统</title>
<style>
body,html{ margin:0px; padding:0px; font-size:12px;}
.login_bj{ background:url(<%=imagePath%>/privilege/login_bj.gif) repeat-x; height:552px; width:1000px; margin:0 auto;}
.wapper{ width:692px; margin:0 auto; height:460px; padding-top:46px;}
.login_left{ background:url(<%=imagePath%>/privilege/38.gif) no-repeat; width:424px; height:460px; float:left;}
.login-right{ background:url(<%=imagePath%>/privilege/login_right.gif) no-repeat; width:268px; height:460px; float:right;}
.login_div{ margin-top:146px;padding-left:15px;}
.login_div table{ line-height:30px;}
.login_div table th{ text-align:center; width:60px; font-weight:lighter;}
.login_div table td{ text-align:left;}
.clr{ clear:both;}
</style>
		<script type="text/javascript" src="<%=path %>/js/commom/jquery.js"></script>
 		<script type="text/javascript" src="<%=path %>/js/commom/jquery.form.js"></script>
        <script type="text/javascript" src="<%=path %>/js/commom/util.js"></script>
		<script type="text/javascript" src="<%=path %>/js/commom/validate.js"></script>
<script type="text/javascript">
    function processResult()
    {
        <% if(msg!=null && msg.trim().length()>0){ %>
        var msg = '<%=msg.trim() %>'.replace(/&quot;/g, '"');
        var loginMsg = $.evalJSON(msg);
        if(loginMsg.processId=='-1'){
            alert(loginMsg.msg);
        }
        if(loginMsg.processId=='-2'){//踢掉用户
            if(window.confirm(loginMsg.msg)){
                var url = "validatelogin.action?formMap.type=forcelogin";
                $("mainfrm").action=url;
                $("cmd").value="login";
                $("po.userName").value=loginMsg.username;
                $("po.password").value=loginMsg.password;
                $("mainfrm").submit();
            }else{
                return;
            }
        }
        
    <%}%>
        document.getElementById("po.userName").focus();
    }

    function login(){
    /*
    	var url = "login.action?cmd=login&formMap.type=isIndex";
    	$.ajax({
			type: "POST",
			url: url,
			success: function(returnedData){
			}
		});
		*/
        document.forms['myform'].submit();
    }
    function clickEnter(obj)
    {
        var eventObj=(event==null) ? window.event : event;
        var keyCode = (eventObj.which) ? eventObj.which : eventObj.keyCode;
        if(keyCode == 13)
        {
            if(obj==undefined){
                login();
            }
            else
                document.getElementById("po.password").focus();
        }
    }
</script>

</head>
<body  onload="processResult();" class="login">
<div class="login_bj">
	<div class="wapper">
    	<div class="login_left"></div>
        <div class="login-right">
        	<div class="login_div">
  <form id="myform" name="myform" method="post" action="login.action">
  <input type="hidden" name="cmd" value="login"/>
  <table width="230" border="0" cellspacing="0" cellpadding="0">
    <tr>
     <td width="72" height="26" align="center">用户名：</td>
     <td width="158"><input id="po.userName" name="po.userName" value="" type="text" class="log_input" maxlength="20" style="width:135px;"/>
     </td>
    </tr>
    <tr>
      <td height="26" align="center">密&nbsp;&nbsp;码：</td>
      <td><input id="po.password" name="po.password" value="" type="password" class="log_input"  style="width:135px;"/>
      <%--<input name="password" value="888888" type="password" class="log_input" maxlength="20" style="width:135px;" dataType="Require" msg="请输入密码"/>--%>
      </td>
    </tr>
    <%--
    <tr>
      <td height="26" align="center">验证码：</td>
      <td><input name="checkcode" value="" type="text" maxlength="4" style="width:50px;" dataType="Require" msg="请填写验证码"/> 
        <img src="<%=request.getContextPath()%>/image.jsp" hspace="4" align="absmiddle" /></td>
    </tr>
    --%>
    <tr>
      <td height="18" colspan="2">&nbsp;</td>
      </tr>
    <tr>
      <td colspan="2" align="center"> <input type="hidden" value="登 录" name="save" /><input type="image" name="imageField" src="<%=imagePath%>/privilege/log_submit.gif"/>&nbsp;&nbsp;
        <img src="<%=imagePath%>/privilege/log_reget.gif" width="98" height="35" class="but_sty" /></td>
    </tr>
  </table>
    </form>
 </div>
        </div>
        <div class="clr"></div>
    </div>
</div>
<div class="copy"></div>
</body>
</html>


